﻿using SmartWMS.Common.ResponseOutput;
using SmartWMS.Domain.Base;
using SmartWMS.Server.SystemSets.MenuServices.Dto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SmartWMS.Server.SystemSets.MenuServices
{
    public interface IMenuService : ITransientServer
    {
        /// <summary>
        /// 绑定左侧菜单
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        Task<Response<List<MenuDto>>> GetmenuByIdAsync(KeyEntity key);

        /// <summary>
        /// 获取权限树
        /// </summary>
        /// <param name="pId">The p identifier.</param>
        /// <returns></returns>
        Response<dynamic> GetPermissionTree(int pId);
        /// <summary>
        /// 获取全部权限
        /// </summary>
        /// <returns></returns>
        Task<Response<List<MenuInput>>> GetAllPermissionAsync();
        /// <summary>
        /// 添加权限树
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<Response<bool>> AddPermissionTreeAsync(MenuInput input);
        /// <summary>
        /// 修改权限树
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<Response<bool>> UpdatePermissionTreeAsync(MenuInput input);
        /// <summary>
        /// 权限树反填
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<Response<MenuInput>> GetPermissionByIdAsync(KeyEntity key);

        //根据用户ID获取菜单
        Task<Response<List<MenuInput>>> GetMenuByUserIdAsync(KeyEntity key);
    }
}
